<html>
<head>
<meta charset="UTF-8">
<title>数据报文文件生成配置表列表</title>
	<link id="easyuiTheme" href="../../static/easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css"/>
	<link href="../../static/easyui/themes/icon.css" rel="stylesheet" type="text/css"/>
	<script src="../../static/easyui/jquery.min.js" type="text/javascript"></script>
	<script src="../../static/easyui/jquery.cookie.js" type="text/javascript"></script>
	<script src="../../static/easyui/ui-theme.js" type="text/javascript"></script>
	<script src="../../static/easyui/jquery.easyui.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../static/easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
	<script src="../../static/plugin/assets/jslib.util.js" type="text/javascript"></script>
	<script src="../../static/plugin/assets/jslib.jquery.ajax.js" type="text/javascript"></script>
	<script src="../../static/plugin/assets/jslib.easyui.util.js" type="text/javascript"></script>
	<script src="../../ffres/dict/all.js" type="text/javascript"></script>
	<link href="../../static/easyui/themes/frameless.css" rel="stylesheet" type="text/css"/>
	<a href="" target="_blank" id="commonLink" name="commonLink"></a>
<script type="text/javascript">

	function doAdd(){
		JLEUtil.createModalWin('新增', 'PluginDatapackConfAdd.html');
	}
	
	function doUpdate() {
		var row = $('#dg').datagrid('getSelected');
		if (row){
			JLEUtil.createModalWin('修改', 'PluginDatapackConfUpdate.html?' + 'pluginConfId=' + row.pluginConfId + '&confSort=' + row.confSort);
		} else {
			$.messager.alert('提示','请选择一条记录！','info');
		}
	}
	
	function doDelete(){
		var row = $('#dg').datagrid('getSelected');
		if (row) {
			$.messager.confirm('删除提示', '你确定要删除这条记录?', function(r){
				if (r){
					var jsonData = JSON.parse('{'+'"pluginConfId":"' + row.pluginConfId + '"' + ','+'"confSort":"' + row.confSort + '"'+'}');
					$.restfulDelete('../../api/plugin/datapack/conf', jsonData, function(data) {
						$.messager.alert('提示','记录删除成功!','info');
						$('#dg').datagrid('reload');
					});
				}
			});
		} else {
			$.messager.alert('提示','请选择一条记录！','info');
		}
	}

	function doView(){
		var row = $('#dg').datagrid('getSelected');
		if (row) {
			JLEUtil.createModalWin('详情','PluginDatapackConfView.html?' + '&pluginConfId=' + row.pluginConfId + '&confSort=' + row.confSort);
		} else {
			$.messager.alert('提示','请选择一条记录！','info');
		}
	}	

	function reloadList(){
		$('#dg').datagrid('reload');
		JLEUtil.closewin();
	};	
</script>
</head>
<body class="easyui-layout">
<div data-options="region:'north',title:''" style="height: 40px;">
	<form id="searchForm">
		<table>
			<tr>
				<td>&nbsp;配置标识符：</td>
				<td><input name="pluginConfId" id="pluginConfId"/></td>
				<td>&nbsp;配置顺序：</td>
				<td><input name="confSort" id="confSort"/></td>
				<td><a class="easyui-linkbutton" href="javascript:void(0);" onclick="JLEUtil.queryForm('searchForm','dg','../../api/plugin/datapack/confs');">查找</a></td>
				<td><a class="easyui-linkbutton" href="javascript:void(0);" onclick="JLEUtil.clearForm('searchForm');">清空</a></td>
			</tr>
		</table>
	</form>
</div>
<div data-options="region:'center',split:false">
<table id="dg" class="easyui-datagrid" title="" style="width:100%;height:90%"
			data-options="singleSelect:true,collapsible:true,url:'../../api/plugin/datapack/confs',method:'post'"
			toolbar="#tb"
		title="Load Data" 
		rownumbers="true" pagination="true" pageSize="20">
		<thead>
			<tr>
				<th data-options="field:'pluginConfId',resizable:true" >配置标识符</th>
				<th data-options="field:'confSort',resizable:true" >配置顺序</th>
				<th data-options="field:'packDesc',resizable:true" >数据组包描述</th>
				<th data-options="field:'packConfigFile',resizable:true" >组包配置文件</th>
				<th data-options="field:'packFileEncoding',resizable:true" >生成报文文件编码格式</th>
				<th data-options="field:'packFileType',resizable:true" >生成报文文件类型</th>
				<th data-options="field:'packGenerateFile',resizable:true" >生成报文文件</th>
				<th data-options="field:'rsvOption',resizable:true" >备用选项</th>
				<th data-options="field:'validDate',resizable:true" >生效日期</th>
				<th data-options="field:'invalidDate',resizable:true" >失效日期</th>
				<th data-options="field:'lastModifyDate',resizable:true" >最后更新日期</th>
			</tr>
		</thead>
	</table>
</div>
<div id="tb" style="padding:1px">
	<div style="margin-bottom:2px">
		<a href="javascript:doAdd()" class="easyui-linkbutton" iconCls="icon-add" plain="true">新增</a>
		<a href="javascript:doUpdate()" class="easyui-linkbutton" iconCls="icon-edit" plain="true">修改</a>
		<a href="javascript:doDelete()" class="easyui-linkbutton" iconCls="icon-remove" plain="true">删除</a>
		<a href="javascript:doView()" class="easyui-linkbutton" iconCls="icon-ok" plain="true">查看</a>
	</div>
</div>
</body>
</html>
